package com.yiyang.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName("building")
public class Building {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @TableField("name")
    private String name;
    private String address;
    @TableField("number_of_floor")
    private String numberOfFloor;
    //表示当前的删除属性是逻辑删除
    @TableLogic
    private Integer isDelete;
    //这个注解表示将时间格式化
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date creatTime;
    //exist = false表示当前的属性不需要与表中的字段对应
    @TableField(exist = false)
    private String updateTime;


}
